Merge pull request #1563 from jts-arm/mbed

Improvements to Mbed TLS shared heap code