Add a macro to get the opcode number of a request given the interface

This adds a macro called WL_REQUEST_OPCODE which takes the name of the
struct for the interface and the name of one of its members. It then
calculates the opcode number by dividing the offsetof the member by
the size of a function pointer. This assumes the interface struct only
contains function pointers and that they are in order of the opcodes.
Add wl_resource_get_implementation

This gets the implementation for a resource that was set in the
implementation argument of wl_resource_set_implementation or
wl_resource_set_dispatcher. This is mostly useful in conjuction with a
dispatcher which may want to dispatch via the implementation pointers
or just store some extra information there.