Americans on the cusp of retiring are facing a tough choice as they watch their nest eggs shrink: Stay the course or keep working. A stock market slump this year has taken a big bite out of investors’ portfolios, including retirement plans like 401(k)s. The S&P 500, the benchmark for many index funds, is down…