static: implement create_static more efficiently

The previous implementation of create_static was just a thin wrapper
around create, which kept the update and pkt_out pipes open even though
the app would never generate an update or a packet out. The new
implementation uses the lower-level raw_app API to construct the app and
in the process closes the update and pkt_out pipes.
static: implement guard in terms of create_static

The new implementation of create_static achieves the same goals as the
custom implementation of guard. Removing the custom guard implementation
in favor of having fewer combinators implemented at the raw_app level.