Changed context used in all tasks for ApplicationContext, except for
dialogs for what is used a weak reference to Activity Context. This
should avoid memory leaks.