JCS: Add modal capability; app.js can mark a page as 'modal' and user can wrap a template for it; fix ModelJS restoreState issue