Major refactoring of API

Closes #15

@devcritter could you review this. I made some major changes to simplify how the content handler works and to better suit what we need for the XDS.b module. If you can't review both the PRs I just submitted, reviewing this one would be most helpful.
Do you need this specific behaviour? Just thinking that with the recent change where we return null in `getHandler`, it would be good to return null here as well if no handler is found, both for consistency and also because you might actually want to know that the class you were looking for wasn't found (which you can still do, but with this approach you'd have to check that the class of the returned result doesn't match your search).