Added basic platform tree parser with tests

This adds platform tree parser as described in [this RFC](https://gist.github.com/farcaller/b89743924b0170674738).

This PR is not ready for committing yet, I want just a basic code review. The code is quite dirty and there seem to be lots of opportunities for optimisation.

Also, this one adds native code builds and `rake test`.
The dylib name resolution is the same as for rlibs, the only changing thing is the extension. Actually, I would expect that it's `.so` on linux host, need to verify how that actaully works on travis.