Implement rest-sugar

Now the API is more versatile and likely faster as well. It loads the
structure directly to memory now. There are also plenty of new ways to
query the API.