A 401k is a no-brainer way to stash money away for retirement. But how much you should contribute depends on a couple factors. Let's dive in.