Tests: Support for plugin tests

Plugins can implement own tests.

Added basic tests for ItemSync.

Command "keys" can send key presses to modal dialogs.