Merge branch 'release/0.1.0' into develop
Updating constants to reflect new nails layout
More constant redefining
Correcting a bad file_exists() conditional
Added NAILS_DB_PREFIX constant
Adding NAILS_DB_PREFIX across more models
Backwards compatibility updates and constant renaming

 - apache_request_headers() isn't always available, fall back to .htaccess methods, then work it out for ourselves.
 - function()[] isn;t always available either, reverting to the classic $_temp variable approach
 - renamed the AWS_Local constants to reflect were they should be defined.
Renamed and updated the geoip library to avoid naming conflicts with the composer version
Using composer autoloader instead of must ache autoloader
No longer using the asset proxy for SWFUpload in shop admin
Default DEPLOY_CDN_MAGIC is now blank; new logic in CDN library will try to find it if it's not specified explicitly

Also fixed a few bugs with regards the new NAILS_DB_PREFIX constant and local caching for manipulated images
Added a _format_object method in CORE_NAILS_Model so that objects can be easily formatted without having to extend the get_all();
CDN Updates

Removed PHPThumb in favour of composer version; updated CDN controllers to reflect new behaviour in PHPThumb
Updating models to sue core model methods where appropriate, and to respect the NAILS_DB_PREFIX constant
Error methods should now be named consistently and CDN caches objects fetched
Nicer error pages

Plain and simples. If the apps ants the header etc then it should handle either overriding these views itself or create its own error handler.
Autoloading logger and added two helper functions _LOG and _LOG_FILE

_LOG is an alias to logger->line()
_LOG_FILE is an alias to logger->set_file()

removed set_dir() in favour pif setting the entire path in set_file; updated modules to reflect this.
Added todos re unit tests and maintenance crons
Returning reason for email activation/verification failure in the error.
Broke emails out into separate table; updated much of the packages to reflect this change. Also took the opportunity to overhaul the Emailer.

You shouldn't update email addresses through the update() method. email_add, email_delete, email_verify & email_make_primary are your friends now.

The idea is that whenever you add an email address (wit email_add()) the system sends a verification email automatically. To correct typos, the email should be removed and then re-added.

Users can log in with any of their associated emails, mail will only be sent to the primary email. get_by_email will return the associated user and their primary email.

This still needs a bit of work and implementation.

Emailer now has a single archive table and there's no concept of queues - emails are sent immediately, always, this shouldn't be a problem on a properly configured server. If emails need sent at a later date then a cron job should send them.

There will still be some things needed tested