fix(queue) : wait for the process function to end before shutting down queue
fix(queue) : wait for the process function to end before shutting down queue

Also refactor SingleConsumerQueue so that there is only one place where we implement the Capacity, Count, Send and Post methods/properties

FlexSearch/FlexSearch,FlexSearch/FlexSearch,FlexSearch/FlexSearch,FlexSearch/FlexSearch