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.
I guess isEmpty should be implemented in a similar fashion as size to be on the safe side if one wants to allow peek from the outside.