make metadata storage pluggable

we sometimes use longtext, sometimes longblob for payloads, can we standardize to using longblob, although mediumblob (16MB) is probably more than enough for our payloads.