Fix a bug HistoryEntry.trim when the list of values is empty.  If max duration is > 0 this would fail trying to access the first element of an empty list.  Includes a test case to verify the fix.  Also adds additional argument checking to the HistoryLimit constructor to prevent similar defects.
Merge pull request #67 from mjr5749/master

Fix a bug HistoryEntry.trim when the list of values is empty and max duration is > 0