Change implementation of sharedManager

Use dispatch_once to alloc the static manager, this is thread safe and
GCD.
Merge pull request #1 from 0day2010/master

Change the implementation of sharedManager.