Begin implementing abstract platform

Ok, I see. So we are just processing commands until there is nothing in the stream, and then ```swap_buffers```? What if the client waits for response (e.g. for resource creation), would it trigger ```swap_buffers``` unexpectedly?