Add option to NumNonlinearIterations to accumulate over step

ref#4052
This seems dangerous.  A dynamic cast to a reference. Seems like it should either be static because we know it'll work 100% of the time, or it should cast to a pointer so that it may fail.  What does it even mean to dynamic cast to a reference?