Use MM for MySQL resource

Reviewed By: @edwinsmith

Differential Revision: D1729488
make recursion limit for unserialize

Summary: This fixes a stack overflow caused by unlimited recursion in
unserialize. By checking the stack size, we avoid the stack overflow without
breaking anything else. There is no obvious way of running arbitrary code via
this, especially since all inputs to unserialize should be sanitized, but this
will close out this cve and prevent possible exploits.

CVE-2009-4418

Reviewed By: @bertmaher

Differential Revision: D1686292
Update softmagic/libmagic

Summary: Fixes for upstream vulnerabilities/heap buffer overflows in file library

CVE-2014-3480
CVE-2014-3479
CVE-2014-3478

Reviewed By: @JoelMarcey

Differential Revision: D1715704