life cycles of a mercury app