Bugfix #5027: Deleting Shape key sometimes caused corruption to Ipo curves. sort_key() was moving key but not resorting adrcodes for keys and Ipo curves. Also changed behavior of sort_key() so that it only resorts one key; all the places which currently call it only do so after changing one key (the previous code was moving the key one location at a time through the keyblock list).