fix issue #2484,call afterRender() after processOutput() in render()

I use afterRender() to collect html contents then put it to .html file.

the comments of render() says:

> At the end, it calls {@link processOutput} to insert scripts and dynamic contents if they are available.
The question is I can't collect these assets content generated by processOutput().

So I suggest that you can exchange the two call.Thus contents proocessed by processOutput() would convey to afterRender().

Thank you.