On the face of it, the idea of resigning before retirement can sound attractive, but there are a few key calculations that must be done.