Dematerialize - handle non-materialized terminal events

This is used for a use case such as:

```java
observable.flatMap(t -> {
if(x) {
  return Observable.from(Notification.create(t));
} else {
  return Observable.error(e);
}).dematerialize();
```