Further cleanup by grouping related methods in helper struct.

Now, to add more data to the top ducontext file, one just needs
to add another DUContextItemStorage to it and call its helper
functions at the correct places. Much simpler!
Make it possible to (de)serialize problems from/to disk.

This patch is by far too huge to get this minor feature working.
The amount of required boiler plate code is amazing. Furthermore
it was very tough to get this working with the existing usage-pattern
of KSharedPtr<Problem>: When one would naively use that on DUChainBase
items you'll get nasty crashes and double deletions when these items
where deserialized from disk and point to mmapped memory regions.

This patch seems to work within the current framework. Yet it is
quite ugly in my opinion. Still, the best I could do.

What we do now is essentially to always copy the problems from disk
and never leave them pointing to mmapped regions.
Prevent nasty implicit conversion from TypePtr to uint in IndexedType.

Adding an explicit bool operator to TypePtr requires tons of changes
to our code base as that makes the operator _very_ explicit:

http://stackoverflow.com/questions/21350924/explicit-bool-operator-cannot-return-test-initialize-bool

So instead, add and delete a bool-taking ctor to the IndexedType.

Without this, you could compile this snippet:

AbstracType::Ptr type;
IndexedType indexed(type);

and it would crash at runtime as the type gets converted to bool,
then an IndexedType(index = 1) is created which is probably invalid
and then crashes....
TestFile: Fix API a bit

- Add convenience method: parseAndWait()
- Reduce timeout, 1000 ms should be enough. If not, we're doing wrong.
- Add default arguments to both methods