Bug 528408 - Extract the IRequirement impl from RequiredCapability

- Fix p2 codebase to use MetadataFactory instead of new
RequiredCapabiilty

- Work around the implicit restriction that IRequiredCapability must
always have maxCard > 1. This is due to the serialization format that
does not support maxCard == 0 since it only has optional and multiple
flags.

Change-Id: Ia8f2c9abd4aee553020018032a22784f1af3b3ba
Signed-off-by: Todor Boev <rinsvind@gmail.com>
15 files changed