Update AbstractNodeQueue.java to avoid redundant reads of head in peekNode

Avoid spinning on head when a peek/poll observes a null next but the queue is not empty.
Indeed, just today I had this nagging feeling that there was something wrong with this code, I just couldn’t quite put my finger onto it ;-)