Prevent classloader leak in metadata system. Fixes BUKKIT-3854

Metadata values keep strong reference to plugins and they are not
cleared out when plugins are unloaded. This system adds weak reference
logic to allow these values to fall out of scope. In addition we get
some operations turning to O(1) "for free."