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`.
PT macro is quite big so I don't want to drop ioregs in there as well. It might be reasonable to move that to a dedicated macro folder though. Any ideas?