Stop idmap2d after several seconds pass

Idmap2d is continuously running despite invocations to generate idmaps
being rare. This change stops the idmap daemon after 10 seconds without
a transaction.

Bug: 135149444
Test: manual verifications that idmaps are created and then service
      dies.

Change-Id: I38a46e034d56777c15d1b3a5c86a9313ecaf0d4c
3 files changed