C++ model template update 2

Address a number of the @todo items marked up in the template:

- format exceptions nicely
- throw exceptions for all stream errors
- remove unnecessary special-casing for the UUID type
- implement ID attribute serialisation
- correct some small logic errors
- remove @todo items which don't require any action

There aren't any tests for this code yet.  I suggest simply diffing the content of `cpp/lib` after running cmake before and after applying the PR.  Likewise for the java code, there's a tiny change to the UUID class which can be seen diffing `components/ome-xml/target` (no functional change).