Split API classes and interfaces

Split previous API files into many more classes and interfaces. Manager and Server APIs were left as-is.

It may be helpful to create a class hierarchy/diagram.
If that's the case, we need to define the bitfields constants for all the flags. Or alternatively, we can make query flags an array with the options in there.