prevent bones from deleting protected nodes (except air and liquids)

uses specific checks, due to minetest/minetest#2015
A statement like this requires 4 table lookups and you repeat it three times in this one function!
  1. Find `minetest` (in `_ENV` / `_G`).
  2. Find `registered_nodes`.
  3. Find `nodename`.
  4. Find `can_dig`.

Look up the node definition once and cache it in a local variable.

(and use `node_name`, not `nodename`)