Fix a timing problem in ApplicationPool2_PoolTest.

On FreeBSD 8, a usleep(1000) can last tens of milliseconds, so
we increase the timeout.
Implement system-memory-stats.py for FreeBSD.
Fix more C++ test timing problems on FreeBSD. The FreeBSD scheduler is too harsh...