Transition to namespace-based classes/functions
Move WP_CLI::add_command back to cli.php

Looks like WP CLI requires this to be in cli.php unfortunately.
Add templating functions

Props to @paulgibbs for this.