Replaces handwritten typedefs and casts via void* with types inferred
from declarations in omptargetplugins.h. Leaves unchanged a function with the
wrong type and register/unregister which follow a different pattern.
Rename a couple of pointer variables to match the api (missing _target_
Minor change made to dlwrap.h to use the type inference from it.
Without this or similar, including dlwrap.h from a file that doesn't use all the pieces errors about declared but missing static functions. I'm considering moving the non-dlwrap parts into a separate header but leaving that for a later patch.