Introduce some brazen abuse of switch_platform.h

Specifically I re-wrote it from scratch and introduced symbols one
at a time until fs compiled and ran correctly.

Includes a variety of things, like 2038 fixes, and identifies
symbols which can be deleted in the future after particular
cleanup activities have been completed.