avoid cursor leak in AlarmDatabaseHelper

When cursor is done, the cursor must be closed to avoid cursor leak.

Change-Id: I149a264b4ff0013a1c753c03e98fa897516823f6