QPID-5025: check that delivery has not already been ended before signalling commit of dequeue

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1508516 13f79535-47bb-0310-9956-ffa450edef68