Enforce coding style

* Trim trailing whitespace.
* Convert Windows (CR) to Git native new lines (LF).
* Set up composer-test and enforce phpcs rules (added a few
  exceptions to keep clean up minimal).

Change-Id: I4c61ce67c60569b47462ac4525d6ffcbeb55e3e3
gitignore: Ignore cache/*.json

These shouldn't cause a local git clone to have local changes.

Change-Id: I05cb8ac7bf4a418b79cdb28385ac7d1f77247fb5