add test/test_trail.js

The `test_trail.js` file is a close copy of the corresponding ruby file.  The only significant difference is the the Ruby version runs most of the test cases for both `trail` and `index`.  This only repeats one of the joint tests.  

Once I accounted for all the syntactic differences, hike-js passed all these tests.