WIP initial commit of C

Code segfaults on XPC#connect. Debugging to find out whether that is because
xpc needs to run in an event loop, although from the documenation that isn't
very clear, or whether it's related to how the xpc_connection_t struct is
wrapped.