Add support for proxying stat() calls to the privileged host process

We only proxy two stat(...) calls, one for when -i is specified and the other
for when determining whether to resume downloading (-r). We change other stat
calls to use fstat instead.