Add a JS sample, fix require and exit in old samples

- require phantom instead of phantom-node
- remove err parameters from function calls
- add ph.exit calls to every sample
- add a sample written in JavaScript
Merge pull request #90 from mazemult/fix-samples

Add a JS sample, fix require and exit in old samples