Initial code style re-work.

The plan is to bring all of the code style in the Chive codebase up to
date, then gradually begin ripping out various components and replacing
them with composer packages.

It might be worth checking out Yii 2.0 when it's released soon to see if
there's any sort of upgrade path, and if Yii 2.0 is actually worth
using.
Added support for installation-specific configuration.
Code style fixes.
Save login port when saving user config file.