Rework project compilation

This addresses some of the issues raised in #98.  Basically now it's
easier to override default compile/test commands and project compile behaves
similarly to the stock `compile` command.

Note that this is work in progress and more changes are inbound.