Add adapt time steping

Hi Nori, 

Please include my recent 2 commits. 
1) I have added detailed comments in the new TimeStepFunction class, explaining the method. 
2) The input parameters were slightly adjusted. 

I would like to add one more feature in this stepping function. Currently we just return the suggested size for next time step, based on the previous number of iterations. However, if the iterations are too much, e.g. iter > 25, we shall re-run the current time step with a much smaller delta_t. My question for you is, how can we send this re-run signal? Passing next time step size = 0 ?

Best,
Haibing