Handle null model in 'after' filter.
Use CodeMirror to allow editing of app code.

The CodeMirror Javascript library is now used to display controller and view
code, allowing users to edit the code from within the application.
fixed view source in branch codemirror
"view and edit" link now displays both view and controller in a tabbed codemirror editor. 
"save" redirects to the view and controller you where coming from.
Improve look and behaviour of source editing page.

This commit contains several changes. First, the CodeMirror editor is now
resizable, which is particularly useful for the tutorial page. The resizing
requires jQuery UI, hence why that plugin has been added.

Second, the 'view/edit soure' link is no longer shown for the source editing
page, since much of that code is fairly complicated an not particularly useful
for newcomers to the framework.

Third, I've change the markup behind the 'View' and 'Controller' tab buttons
to be more standard and to have a greater differentiation between the active
and non-active tabs.