Improvements to module/target cache.
Improvements to module/target cache.

 * fix race-condition where the item being copied out of the cache might be
   removed in between testing for the existence of the metadata file and
   copying it. (It's better to try than to test...)
 * make the cache size settable in settings file / YOTTA_MAX_CACHED_MOULES env
   var

ARMmbed/yotta,autopulated/yotta,autopulated/yotta,ARMmbed/yotta