Finish lua 5.2 support, trac #865

Lua52 support was started with ac959fed0082cb253d45c7a04866e8654e962442.

Compilation tested with Lua 5.2.1 and Lua 5.1.5.

The short typerror() snippet is taken from luaL_typerror in Lua 5.1.5
(MIT license)

Signed-off-by: Johannes Dewender <rpm@JonnyJD.net>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Rename all hook functions for saner debugging

- Now that the hook functions in plugins no longer need to be uniformly
  named, rename them to more "natural" pluginname_hookname style so
  __func__ (and gdb etc) give meaningful, distinct values for them.
  No functional changes unless I typoed something.
Permit scriptlet exec context setting to fail in non-enforcing modes

- This is what rpm_execcon() in libselinux always did, and trying to
  be more strict causes things to blow up on install to an empty
  chroot where /proc and /sys/fs/selinux are not mounted.