Tidy

* Rename key_func to insert_sort_key.
* Follow import conventions in test suite.
* Don't export insert_sort_key.
* Get rid of get_scid

Change-Id: I75d9e43ae8cd9b309430eb1f2015918710d7c18f