Make the plugin api read dll/so contents

This enables the plugin api to read symbols from dll/so plugins,
and use the symbols as necessary. This mostly works, though
it still requires some refinement.