Allow the adding of JS blocks during execution

Summary:
Calling `addJsBlock()` will allow a block of JS to be written to the footer of the page after all the required resources have been added.
Fixes T68

Test Plan: Call the method, check the js is there.

Reviewers: brooke

Reviewed By: brooke

Maniphest Tasks: T68

Differential Revision: http://phabricator.cubex.io/D16