Abstract ui functions to a ui manager class...

- The Router's default ui manager is an instance of SparkUIManager.
- You can set a new ui manager like this:
    Router.setUIManager(function () {
      return new BlazeUIManager;
    });
- Created common API that can be used by various UI managers including:
  - template: function (value)
  - setRegion: function (key, value)
  - clearRegion: function (key)
  - data: function (value)
  - render: function ()
  - insert: function (parent)

Next:
  - Clean up RouteController
  - Try out blaze-layout
Move wait_list and hooks into their own files.
Fix issues from blaze-layout integration test.
Get tests passing again.
WIP - Computations, stop() and run()...

- Make run _run to indicate it should be private (people sometimes accidentally
  override it)
- Move computation from router into RouteController
- Calling stop() on controller stops computation also
- Router calls stop on previous controller if it exits
- You don't need to ever manually call stop anymore, even to redirect

Next Up TODO:

- Run each hook in its own computation
- Clean up default hooks to make them opt-in
- Clean up data context api and setting
- Clean up layout setting
- Make tests pass again and then clean them up
Clean up API contracts...

- Between RouteController -> Router -> UI Manager
WIP - Clean up hooks...

- loadingTemplate and notFoundTemplate hooks are no longer added by default. If
  you want that behavior you can ask for explicitly using the string name of the
  hook (e.g. renderNotFound, renderLoading)
- If you specify a hook by string name, the Router.hooks namespace is searched.
  This gives us a place to put standard hooks and for other package authors to
  add new hooks.
- Data is set in the _run method of controller (not a hook) and waits for the
  controller to be ready (this.ready()).
- Layout is set right away on teh controler.
- Each hook is run in its own computation. This will **likely** change as it
  poses a few issues.
- Some API cleanup around uiManager

Next:

- Better hook design
- Client side blaze helpers like linkTo and pathFor
- Tests
WIP - Clean up hook and action behavior.

- When you run a controller it goes into the isRunning state and creates an
  outer computation for the run.
- A few things get run in sequence:
  1. set layout
  2. run onRun hooks
  3. computation -> run waitOn functions and populate waitlist
  4. computation -> when ready() set data
    - run onData hooks
  5. computation -> run action
    - onBeforeAction (legacy: before) hooks
    - run action function
    - onAfterAction (legacy: after) hooks

- When the router or user stops a controller by calling "stop":
  1. stop computation
  2. run onStop hooks
  3. isStopped state is true

  - Once a controller has been stopped it cannot run again for now.
WIP - fix lib/router hook method definitions.
WIP - Start cleaning up tests.
Built a made up project with a bunch of hooks
WIP - Fix up hooks based on discussion with Tom...

- You can't call _run twice on a controller without calling stop first.
- You can't call stop from within run or any of its computations. It's just a no
  op but will give a warning for legacy.
- hooks get a pause function passed as a first parameter and can stop
  downstream hooks from running until the outer computation is invalidated.
Merge remote-tracking branch 'origin/blaze-integration' into blaze-integration
Remove ready() check in default action...

- onBeforeAction hooks can pause if they don't want the action to run.
- @tmeasday, take a look when you can.
Configure template and controller name converters...

For example:

Router.configure({
  templateNameConverter: 'class', // or 'camel'
  controllerNameConverter: function (input) {
    var output = Utils.capitalize(input);

    // note the output will still have Controller appended at the end
    // for now

    return output;
  }
});
WIP - Fix some bugs, make server work...

- Only add spark helpers if we're using spark
- Make server route controllers work again
- Get rid of Client/ServerRouter and just have Router
- Get rid of annoying params warning for route paths
Merge remote-tracking branch 'origin/blaze-integration' into new-location

Conflicts:
	lib/client/router.js
	test/client/router.js
Merging..
Got *my* tests passing again
Simplified the basic example to get it working..