hiera: use the same lookup rules for private and public hiera dirs

At the moment, private/common and common/ directives acted differently:

$apache::mpm::worker would be searched in

$base/hieradata/common/apache/mpm.yaml

for common (searching for the variable "worker") and

$private_base/hieradata/common.yaml

for private/common.

This patch makes both hiera directives work as "common" did before.
Also, a bug that caused the search key to get modified was fixed as well.

Change-Id: Ieb958008c1a67f48d24be5967b08f6f0ddcb86ea
Signed-off-by: Giuseppe Lavagetto <glavagetto@wikimedia.org>