api_create and api_start: work toward making them thread-safe

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>