Move SQL dialects back into core

effectively revert #265