Another major refactor

I’m pretty happy with this state of affairs, will start building on top
of this.
Major Ideas:

 - Separate insert from updates - I first do a batch insert of
everything then figure out which relationships need updating which
fields - that way in some cases it will end up with more SQL queries
than possible, but the code is much much simpler. Could be optimised in
the future of course.
- Use SplObjectStorage as much as possible as it has a lot of useful
helper methods. Since we have identity map, then the default
->contains() and ->attach() methods make a lot more sense.
- Didn’t found any sane way to separate Links from Models