haiku: Import some code from Artur's gsoc work

* Add initial calls to find the accelerant and open it