make Makefile more luarocks friendly

This includes respecting the CC, CFLAGS, and LDFLAGS environment variables, as
well as a hack to fetch the c-periphery submodule before building, because
there doesn't seem to be a way to specify pre-build hooks in the luarocks
rockspec.