Implement filtering by activity for external devices - SL #4523

The class InplaceResultSet ignored the 'activity' filter.
This patch need change a import in shell.py to avoid
a circular import error.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>