Inhibit suspend while a activity is shared

This patch is a port of the patch included in the ticket OLPC #10363.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>