Fixed testOnErrorViaHasNext in issue #383

Hi,

This PR fixed the issue that `testOnErrorViaHasNext` fails sometimes. It only tries to avoid the failure of unit tests.
However, there is still an issue in the `next` operator. The `hasNext` may return true, but the later `next` throws `IllegalStateException("Observable is completed")`. An example unit test throws `IllegalStateException`:

```java
                @Test
        public void test() {
            Subject<String, String> obs = PublishSubject.create();
            Iterator<String> it = next(obs).iterator();
            assertTrue(it.hasNext());
            obs.onCompleted();
            it.next();
        }
```

I think @abersnaze is right. 
> hasNext should block until either the onNext or onComplete has been called.