OnSubscribeRefCount with Synchronous Support

Redo of https://github.com/ReactiveX/RxJava/pull/1753 with fixes to unit tests.

Fixes https://github.com/ReactiveX/RxJava/issues/1688