Fixes porblem with moifying to null values

It's a bit of a dirty fix, but the whole system that causes the problem
should be yanked out soon when we do clean-up, so I don't consider it to
be a problem.
Fixes bug when mixing updates and inserts

Originally: for each type: inserts, then modifications, then deletions

Now: inserts of each type, then modifications of each type and then
deletions for each type.

This makes sure that new objects have been inserted by the time we update,
meaning they have valid ids, which means we can treat them like any other
objects.
Removed necessity for flush before modifyAny

... by calling flush in modifAny.
Fixes assortment of bugs in Advanced Update

It was just way undertested, meaning it was a mindefield of bugs (and in
very complicated code at that). Things shoudl be a little better now.
Fixed two problems with caching of db results

First, the cache wasn't used because some wrong variables were used.

Second, the cache wasn't beign emptied upon a flush, which it now is.
Fixed bug with null fields and resolvers

There was a problem with null fields in a query result and creating the
object that went with that result.
The column count had to be updated when there was a null value, but not
when the column wasn't present, but it wasn't increased in either case.

To fix this bug, some cleanup was done in the object creation code in
SQLStore(Compiler). It's still messy, but not as messy as before.
One more fix for Advanced Updating

(and undoing a mistaken change from before)

This is a very small fix, but in some complicated code, but things are
working much better now.
Removed code that wasn't sanely reachable

I believe I added this code copied from one of the other classes in an
attempt to navigate the minefield of bugs. However, now that many of the
bugs have been taken out, it is clear what the code exactly meant and ti
just doesn't make sense.

Basically, it was code that was only reached if you provided a non-new
object as the root for a condition that was then used to do a modifyAny,
but that makes no sense to do and should just be replaced by a normal
modification in any case.
Properly implemented deleting from database

This resolves #27 (and gets us back to where we were long ago, before I
tried to solve #39 in this absolutely wrong way)
Removed object caching (from db)

This should be reintroduced eventually, but can only be done once the
issue with it (objects not getting properly resolved) is fixed. See #42
for more details.