Fixing tests and Redis persistence not closing gracefully.

Summary:
- Fixed a bunch of tests now the Mosca server closes its persistence.
- Made the Redis persistence client gracefully close.