[Enhancement] Can `by` arg in `.sort_index()` handle functions? 
I usually have to do the following to get columns sorted in a certain arrangment but it would be useful to have a one go method:
```python
func_sort = lambda x: (x[0], x[1]) # or something
sorted_columns = sorted(df.columns, key=func_sort)
df_sorted = df.loc[:,sorted_columns]
```
but it would be cool to just do this:
```python
df_sorted = df.sort_index(by=func_sort, axis=1)
```

Thoughts?

Right now I am currently using 0.22.0 b/c 0.23.0 has a bug regarding multiindexes.  https://stackoverflow.com/questions/50662091/cannot-create-pd-series-from-dictionary-typeerror-values-is-not-ordered
