[prolog] add async/1 predicate for functions too

Test Plan: make test

Reviewers: bill

Reviewed By: bill

CC: bryano

Differential Revision: https://phabricator.fb.com/D1009013

Task ID: 3013702