General rework of the central Server library classes Surface, Subsurface and Buffer.
- Clarified the commit states a subsurface can have in its commit lifecycle: pending, cached (if synced), committed.
- Simplify the state update flow. Remove unnecessary checks.
- Outsource subsurface-specific functionality in Subsurface class.
- Expanded and documented subsurface test.
- Converted Buffer API to using std::shared_ptr with implicit buffer release.