jsref: add -version command line option

Inserts current git commit reference into jsref binary on compile, expose using -version flag.
Appends -dirty to the version if repository has unstaged changes.
For use with testrunner script.

Closes #1