Add guards for creating, suspending and resuming Tasks

This is somewhat dependent on #312, because `#timeout` does cross-task scheduling.