[CB-6837][Android 4.0.x branch] Fix: leaked window when hitting back button while alert being rendered

CB-6837
It is basically:
https://github.com/apache/cordova-android/pull/122 
Only this is refactored for 4.0.x branch.

Description:
Keep track of the last AlertDialog showed.
The last dialog showed that is rendered while hitting back button it causes a leaked window.
Instead of perform a full track of all dialogs created, only destroy the last one showed, this fixes the problem.

Tested on 4.4.2.