Refactoring the static completed Task and NonCastable enum so they are not defined within a generic type, adding array shrinking to AsyncPriorityQueue, and adding tests.