Add maxlength support for sorted sets

Similar to lists, add `maxlength` support to sorted sets.
An additional option `pop_highest_scores` determines whether to pop highest or lowest score elements. The default is to pop lowest score elements.