Break server's frame scheduler into its own file & type.

Will be rewritten properly later. Just moving it for now.
Fix the one func missing its paranoid writeG.check call.