Merge pull request #4468 from markshawtoronto/ticket/14799
[ticket/14799] purge_notifications() should not leave open transactions.
* markshawtoronto/ticket/14799:
[ticket/14799] purge_notifications() should not leave open transactions.
[3.1.x] Increase version for 3.1.11 development
[ticket/14799] purge_notifications() should not leave open transactions.
When running purge_notifications(), if a notification type does not exist
then a db transaction is started but never completed.
On an error in get_notification_type_id(), end the transaction.