api: add is_root() (RhBug:1062889)

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1062889
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>