Fix ReplaySubject Terminal State Race Condition

Fixes https://github.com/Netflix/RxJava/issues/1147#issuecomment-42232464 with change from @akarnokd