Handles the activity lifecyle for rxjava's Observable