move shebang checking to api

check for shebangs in `jsfmt.format` and `jsfmt.validate` also add tests for it.