reloading: backport reloading fix

Issue #364 was fixed upstream in r3492.  Backport the fix to master.

"We only need to shut down the caches in child processes because they are not
started in the master process.  This wasn't a problem before, but shutting down
the caches can start a thread which isn't safe to do in the master process of a
forking server like Nginx."

Also backport the change from r3497 where we use a DCHECK for
may_start_threads_.  It's bad to start threads in the root process, but it's not
worth crashing a production server over.
Merge pull request #508 from pagespeed/jefftk-backport-reload-fix

reloading: backport reloading fix
Add -Wno-unused-local-typedefs and -Wno-error to CFLAGS to fix build issues on GCC 4.8.
Merge pull request #528 from pagespeed/jud-gcc48

Fix GCC 4.8 build errors
merge commit