tools: extract template to obtain name of $head
tools: extract template to obtain name of $head

The cascade-head needs to determine the name of entity to
report in the dependency list. Some elements might not be
simply named by testing the @name attribute. Provide a template
that determines the name.

Signed-off-by: Jan Viktorin <3eab6ac54c005c4408f608556a6663b7f2abede7@fit.vutbr.cz>

BeeeOn/server,BeeeOn/server,BeeeOn/server,BeeeOn/server