Adding hooks for 'beforeNext' and 'beforeBack'

I've added support to your library for 'beforeNext' and 'beforeBack' hooks.  This will allow input validation before the user continues to the next step (or backtracks to a previous step).