add hasObservers method to Subjects (#1772)

as per https://github.com/ReactiveX/RxJava/issues/1772

SerializedSubject now keeps track of the actual Subject.
BufferUntilSubscriber synchronizes on the state guard.