AppUsageEvent when deleting an app

[finishes #62480766]

Signed-off-by: Phan Le <ple@pivotallabs.com>
Make error handling more generic in specs so it works for mysql too.

Signed-off-by: Phan Le <ple@pivotallabs.com>