Add callback support to ShadowAccountManager

I endeavored to make this change in a way that wouldn’t break existing
clients. I also assume that it does not make sense to have multiple
outbound callbacks for addAccount, as the user can only add one account
at a time. Fixes #1308