add _optimize_rotation functions and test

findrotation_kabsch fails the tests

findrotation_kearsley passes the tests