Dictionary with sorting capabilities on keys, values, or attributes or functions of either