Fix reloading controllers when to_prepare blocks are used in the app

Call prepare to run to_prepare blocks after marking all for reloading.
Merge pull request #228 from iNecas/call-prepare-after-reload

Fix reloading controllers when to_prepare blocks are used in the app