Fixes for crashes seen when running sprout under load
Merge pull request #517 from Metaswitch/iss509

[Reviewer: Matt] Fixes for crashes seen when running sprout under load