rsruby now works for me on Linux Mint 14

I integrated bluebomble and Aaron's changes with a few of my own.

I didn't review Aaron's; I merely trusted them.  bluebomble's change is necessary to get rsruby to compile on ubuntu.  I fixed some additional code triggering gcc warnings.

Lastly, I changed the configuration script so that it tries "R RHOME" and puts the result in config.h so that the resultant library can be run without setting --with-R-dir or setting R_HOME explicitly.