SQL: add multi-index support to legacy mode

Closes #6881.

@danielballan Added multi-index support to legacy mode, wasn't actually not that difficult (all tests seems to pass). And at once also ``index_label`` kwarg is supported in legacy mode.

This just leaves the issue that this is actually an api change, so could possibly break code.