Added java version and architecture detection

Fixes #29
I meant this:

```js
// at the top
var javadetect = require('./javadetect');
// later
javadetect(function( ... ) {});