Order api methods the same in all backends.

Also inlined some methods for redis/mongo.