RFC 7 implementation

NEW: table to hold the SubmitPools and table to hold the relation between
submitpool and queue

Work ongoing: allows follow up and make sure I don't do crazy things. DO NOT MERGE!