Recognize and validate input apps and input entries

This patch add the optional 'role' element to the manifest.
Gaia will recognize role=input apps as input apps (usually virtual keyboards).

An input app may declare multiple input entries in the `inputs` dict. An entry must contain certain elements and it must be validated too.