Added events to watch for application activation.

Form now has events to watch for application activation and deactivation. These are similar to the Activate event. However, the Activate event triggers any time the form gets focus; also when e.g. a modal child dialog closes. The ApplicationActivated and ApplicationDeactivated only trigger when the current application was changed.