Simplify getNodeId(). #performance

We cast the resource as an integer, and then we md5 it. In this way, we
save an output buffer creation and destruction.
Avoid an implicit cast. #performance