sortdict: add insert method
Future patches will allow extensions to choose which order a namespace should
output in the log, so we add a way for sortdict to insert to a specific
location.
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
$ hg init
$ echo 'base' > base
$ hg ci -Ambase
adding base
$ hg qnew -mmqbase mqbase
$ hg qsave
$ hg qrestore 2
restoring status: hg patches saved state