Metadata locks

Work arounds for metadata lock issues with MySQL.

All CREATE operations now check for existence first, otherwise metadata locks can kill performance.