Reorganisation of the header inclusion

* Sort the headers to reflect the source code reorganisation
* Ensure that the header being implemented by a C++ file is always the first in the list
* Use opaque classes to reduce header dependencies; this potentially speeds up incremental compilation