Switch to using virtual function tables for platform-specific functions

This allows for platform-specific functionality to optionally be explicitly
unimplemented by setting the function pointer to NULL. This allows, for example,
offering more specialized code for certain platforms.