Buxfix SQL exception.

To avoid SQL exception due to post already exist we must verify that we
have not been at this location before. Before we try to insert the post.
Do an proper exit of application

When exiting AlarmActivity we should return to mainActivity and we
should also make sure to get mainActivity to initial state meaning only
show searchView.