v1.1 update

Copied from SVN.

Updates:

r144: key attribute to Model->getChildren and Model::_getChildren to
pass along to Model::_getObjects and set return array key to object
attributeExists

Updated Model\Collection to allow model methods to be called on the
collection e.g. $collection->delete () will call object->delete ()for
each in the collection.

r145: Added key to Model->toArray for 4rd argument of children e.g.

$obj->toArray (FALSE, array (
'elements' => array ('children', 'Sonic\Model\Elements', array ('id',
name'), 'name')
));

Would return object element children with id and name attributes, with
each child's array key in the output being its name.

r146: Bugfix for Bootstrap to check class exists before method exists..
this shouldnt be required but was erroring on a shared server.

Updated config include to check for config paths.php file in the main
config dir if one doesn't exist in the specific config

r147:

Updated Bootstrap to provide more advanced controller calculation e.g.
\admin will first look for \Sonic\Controller\Index->admin (), then
\Sonic\Controller\Admin->index and failing that
\Sonic\Controller\Admin\Index->index ()
Controller updated so that any action beginning with __ (double
underscore = PHP reserved) is invalid.
Whitespace in \Sonic\Resource\Email.php
Added \Sonic\Controller\JSON class to provide core JSON controller
functionality.

r148:

New JSON controller to provide JSON response methods success and error,
and cope with native JSON input.
New Session controller to ensure a user is authenticated and send to
login page if not.
New Session\JSON controller to provide JSON methods with sessions.
Smarty view bugfix to remove initial / which was breaking the template
path for a root action
Same bugfix for Bootstrap with controller

r149:

Smarty include/config update to load smarty settings from config rather
than include.
Addition of smarty error reporting constant (useful for hiding smarty
variable notices rather than using isset)
Split User::_Authenticate method into seperate $user->checkPassword
method for checking a user password is valid from a comparison.
Controller\Session assigns user object to the view.
Controller\Session->checkAuthenticated sets friendly error message if a
session is invalid
Bootstrap bugfix to strip first character if its \
Additional controller class/action check
404 exception code thrown if a controller/action is invalid so that the
front-end can easily send a 404 response

r150:

Bootstrap only sets controller module, overwriting the controller
default, if one is set for the bootstrap.
JSON controller getArg calls parent (checking post and get) if arg is
not set in JSON.
Session controllers have authModule param for future functionality, and
login template is set to authModule/login.tpl
Parser error messages apply ucwords to attribute name

r151:

Captureall method for controller

/Controller/Action resolution:

Default controller: Index

Controller->Action
Controller->captureall
Action->index
Action->captureall
Action\Index->index
Action\Index->captureall
404

r152: Model update to return FALSE if error in executeCreateUpdateQuery