modules/getent: Implement a $(getent) template function

This implements most of the $(getent) template function, with the syntax
proposed in #26. $(getent hosts) is not implemented, and the rest aren't
all that portable, but for now, this will do.

Requested-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>