Various fixes, formatting, and testing and compatibility enhancements

Apologies that this turned into such a large pull request. Aside from many automated style fixes, this includes a fix for a database related error on installation, some issues with the visibility on items uploaded using the API, and a small a bump in the version of Zend to fix some compatibility issues with newer versions of PHP. It also adds many missing style tests, adds tests to the module template, and introduces Travis CI testing.