Refactoring OperatorViewDetachedFromWindowFirst

1. Renaming to OnSubscribeViewDetachedFromWindowFirst.java
2. Adding tests to assert the desired behaviour
3. Refactoring to avoid the "instantiate and forget" approach
within OnSubscribe.call(..)

Signed-off-by: David Marques <dpsmarques@gmail.com>
Making OnSubscribeViewDetachedFromWindowFirst.java package protected

Moving OnSubscribeViewDetachedFromWindowFirstTest.java to the right
package so the test can access the target class.

Signed-off-by: David Marques <dpsmarques@gmail.com>
Making style fixes and removing usage of junit.* classes.

Signed-off-by: David Marques <dpsmarques@gmail.com>
Added LifecycleEvent enum

Can be used for all the major Activity and Fragment events.
Added OperatorSubscribeUntil and tests

The issue with takeUntil() is that it calls onComplete() in the parent; that
is not exactly the behavior we want, so this should take its place.
Added LifecycleObserver and tests

- Added bindUntilLifecycleEvent(), which automatically unsubscribes when a
  particular LifecycleEvent is emitted by a lifecycle.

- Added bindActivityLifecycle() and bindFragmentLifecycle(), which figure out
  when you want to bind a subscription until.
fixup! Added OperatorSubscribeUntil and tests
fixup! Added LifecycleObserver and tests
fixup! Added OperatorSubscribeUntil and tests
fixup! Added LifecycleObserver and tests
Implementing an OnSubscribe that emits a Cursor as it moves to next.

This commit removes CursorIterableAdapter.java and implements the
Cursor navigation and safe closing in one place.

The option to use doOnTerminate(..) will not work as well to close
the Cursor since downstream operators while emiting errors would
not pass through the operator closing the Cursor.

Signed-off-by: David Marques <dpsmarques@gmail.com>
Merge pull request #76 from dpsm/feature/cursor

Adding support to create self closing Observables from Cursors
Merge pull request #70 from dpsm/0.x

Refactoring OperatorViewDetachedFromWindowFirst
Merge pull request #75 from dlew/dlew/lifecycle-observable

Added LifecycleObservable binds
Porting Novoda work on RxAndroid to official repo

This is adding a resumable logic to handle Observables on rotation if
needed and add some wrapping logic around Dialogs and Navigation on
Android
Update build and configuration to latest.