Implement str.rpartition and add tests for it.