Clean up test_content_directory_server so semantics becomes clear.

The prior code's semantics was hard to understand due to the deep code-
nesting, frequently used try-except-clauses and such. Now the code
uses a decorator to wrap the callbacks by try-except and ensure errback()
is called on failure.

There are still quite some redundancies to be removed, e.g. the device
query.

I'm pushing this to branch `maintain/0.6.x`, even if it is a large,
non-bug-fixing change, since it helps building further test-cases so much.