Make better portability OSX binary packages with GCC

Summary: The simplest application of the patch, after the removal of gcc from the system hhvm will still be working on OSX, apple doesn't have gcc >= 4.8. When transferring to another Mac or build PKG #3132 before that I couldn't run.
Closes #3195
Created from: https://github.com/facebook/hhvm/pull/3195

Reviewed By: ptarjan, fredemmott

Differential Revision: D1437024
fix MaxRss out of bounds hhvm don't stop problem

Summary: When more than 6g not stop hhvm,beacause function Process::GetProcessRSS return type is int;
if Process::GetProcessRSS return value than 1024*6, Process::GetProcessRSS * 1024 * 1024 in checkMemery , it return value is 0;
So is never greater than 0 MaxRSS;

e.g:

	#include <stdio.h>
	int main () {
	   int a = 1024 * 1024 * 1024 * 12;
	   printf ("%d\n",a) ;
	   a = 1024 * 1024 *  12;
	   printf ("%d\n",a) ;
	   return 0;
	}

print result:
0
12582912

we see first var a have out of bounds.

so we can modify Process::GetProcessRSS return type to int64_t solve this problem.

I have tested this modify way.
Closes #3189
Created from: https://github.com/facebook/hhvm/pull/3189

Reviewed By: @ptarjan

Differential Revision: D1435402
SplFileObject->seek() throws a LogicException on negative values

Summary: Split from  #3056
Closes #3175
Created from: https://github.com/facebook/hhvm/pull/3175

Reviewed By: @ptarjan

Differential Revision: D1432749
Fix a segfault cleaning up persistent sockets

Summary: This is a fix for #3074 where cleaning up dead persistent sockets
sometimes caused a segfault, because the dead socket was removed
from the persistent resource store before being closed. Removing
an object from the persistent resource store can end up deleting
the object, which is what happened in the segfault case.
Closes #3101
Created from: https://github.com/facebook/hhvm/pull/3101

Reviewed By: mwilliams, ptarjan

Differential Revision: D1435379