Check modified files, pass select JS to jshint, run phpunit in vagrant

Allow pre-commit to check unstaged files (use -m)
Only check JS files that have been modified or staged
Attempt to run phpunit in vagrant if in a vagrant project
Run phpunit locally if WP_TESTS_DIR env var is present
Only run phpunit if there are changes to PHP files