Cache the dlsym() results instead of looking up on each call
Cache the dlsym() results instead of looking up on each call

Instead of looking up the appropriate symbols on each call to open,
mkdir & the rest, use a constructor function to populate a few static
variables, which we'll use later instead of the repeated lookups.

Signed-off-by: Gergely Nagy <6780fac3b38619ac20422286e4110a70dbba2203@balabit.hu>

paultag/tmperamental,paultag/tmperamental