Add initial test cases to cover search functionality

I don't think these are bulletproof yet (not that tests ever are) but
they at least make sure all the code is covered somewhere.

To aid testing this change adds an __init__, __eq__ and __repr__ to the
ContentSection class. Simply making it easier to do asserts and see
where they don't match up.

It also moves a testing herlper to the module level, making it easier to
create fake table of contents objects.