Fixed checkstyle errors in DynPrioQueue

See http://jenkins.terasology.org/job/Terasology/1183/checkstyleResult/HIGH/

It wasn't clear to me why the lock field was assigned to a local variable. It is final, so there shouldn't be any multi-threading issues. The code also runs fine on my machine.

Can you review the changes, @MarcinSc?