create a common lib, autogen the buffer classes there dynamically

simplifies the generate_buffers function a bit.

only missing part now: get the binaries to rebuild when the buffer
class is updated. apparently this doesn't cause the common library
to rebuild and so the client and resource binaries don't know they
need to rebuild automatically. but at least the _generated.h files
are now dynamically created. huzzah for that.