AccountManagerService: initialize cursors within try/finally block

Change-Id: I8368fa390e94f36fd9c65a34631f320247e5e33e