https://issues.apache.org/activemq/browse/AMQ-2789 and https://issues.apache.org/activemq/browse/AMQ-2843 - adds tests for cursors and stores and fixes a PrioritizedPendingList bug