Install lib as rubylib

Homebrew happily symlinks any folder called lib into /usr/local/lib/ and
then yells at you about it like it's _your_ fault.

The easiest way around this is to install the lib directory with a
different name.

Also, extract the crazy Xcodeproj native extension building into a new
method for clarity