Added a stress test for repeated map creation/clear/destruction.

See #2138
Merge pull request #2145 from pveentjer/memoryusagestresstest

Added a stress test for repeated map creation/clear/destruction.