Change the implementation of sharedManager

Use dispatch_once to alloc the static manager, this is thread safe and
GCD.