Added a 'reverse' sorted option.

This orders the legend entries in reverse order of their series.
Updated the API with the legend 'reverse' option.
Merge pull request #957 from dnschnur/legend-reverse

Added a legend 'reverse' sorting option.