FBString conservative additions

Summary:
Now that fbstring is conservative by default (D1373308), we can remove
the mutability of the data members and the call to c_str() in operator[].

Test Plan: fbconfig -r folly && fbmake runtests

Reviewed By: lucian@fb.com

Subscribers: folly@lists, sdwilsh, njormrod

FB internal diff: D1382644
Make fbstring libgcc-safe

Summary:
Some libgcc-incompatible code has been added to fbstring.
Removed/reorganized it so that we can drop fbstring right into libgcc.

Test Plan:
fbconfig -r folly && fbmake runtests

Copied FBString.h into libgcc's basic_fbstring.h, with no modifications.
Successfully tp2_build libgcc/4.8.1. Adjusted symlink, then fbmake clean
&& fbconfig -r folly && fbmake dbg. The fbmake dbg failed with an
assertion error, which is consistent with @lucian's observations in
D1373725; the important part is that the error was at runtime, so the
compile-time changes of this diff looks good.

Reviewed By: lucian@fb.com

Subscribers: folly@lists, sdwilsh, njormrod, lucian

FB internal diff: D1382873
Expose EVLOOP_NONBLOCK

Summary:
This diff allows users to loop through EventBase without blocking if there are
not any events to process.

This is useful for sending and receiving requests on network, where users just
want to try if there are any events and do not want to block if not.

https://phabricator.fb.com/D1373887 is an example where we find this feature
useful, otherwise we have to add an empty callback before loop.
event_base_.runInLoop([] {});
event_base_.loopOnce();

@davejwatson, @fugalh, @simpkins, @stepan: Could you please take a look at the
proposed changes and let me know if there is any better ways of doing this.

Thank you!

Test Plan:
I think this would not break anything, but we might want to do some performance
profiling if needed.

Reviewed By: hans@fb.com

Subscribers: simpkins, davejwatson, fugalh, stepan, folly@lists

FB internal diff: D1383401
Add ThreadName.h to folly's Makefile.am

Summary:
fbthrift depends on <folly/ThreadName.h>, which isn't currently
getting installed as part of the autotools build.  Add it to Makefile.am

Test Plan:
Made this change to folly, re-autogen/configure/install, and
then was able to successfully compile fbthrift's compiler

Reviewed By: davejwatson@fb.com

Subscribers: doug, folly@lists

FB internal diff: D1397084
Make randomNumberSeed read from /dev/urandom

Summary: Because @lesha asked "why not" and I couldn't give him an answer.

Test Plan: random_test

Reviewed By: bmaurer@fb.com

Subscribers: bmaurer, folly@lists, jhj, kma, lesha, sdoroshenko, soren

FB internal diff: D1394401
folly OSS fixes: add ThreadName.h and compression

Summary: Also, optionalize dependencies on compression libraries.

Test Plan: fbconfig -r folly && fbmake runtests_opt

Reviewed By: meyering@fb.com

Subscribers: kma, jhj, simpkins, lesha, folly@lists

FB internal diff: D1396573
Scheduler interface of Executor

Summary: and ManualExecutor implementation

Test Plan: unit tests, contbuild

Reviewed By: davejwatson@fb.com

Subscribers: bmatheny, folly@lists, net-systems@, fugalh, exa, marccelani, jsedgwick

FB internal diff: D1392999

Tasks: 4548494
Fix for folly open source build on Ubuntu 12.04

Summary: On 12.04, there's both /usr/lib/libiberty.a and /usr/lib/libiberty_pic.a, and _pic is the one we want to build a Folly shared library.

Test Plan: build on Ubuntu 12.04

Reviewed By: meyering@fb.com

FB internal diff: D1402194
folly OSS fixes: add ThreadName.h and compression

Summary: Also, optionalize dependencies on compression libraries.

Test Plan: fbconfig -r folly && fbmake runtests_opt

Reviewed By: meyering@fb.com

Subscribers: kma, jhj, simpkins, lesha, folly@lists

FB internal diff: D1396573
Oops, fix README

Reviewed By: meyering@fb.com
Test Plan: no