Also introduces a separate constant for the sql directory, so that it can be put separately from the rest of the data if required.
The new functions always creates normal and partitioned functions. Also adds specialised connection and cursor classes for adding frequently used helper functions.