REST support for posts and pages

Adds REST implementations for posts and pages:

- All post and page management is now done through `PostService`
- Categories are now automatically created if included in the post response
- There are a few workarounds for API bugs that are pending resolution

Well, this took a while :smile: 

I'll be testing this more over the next days, but since it's a big PR you can start reviewing the code and testing as well.

Fixes #1901 
Isn't this check a waste as the iterator below will just never run with 0 posts?