allow making dependencies utility-specific in manifest.xml

This commit allows to add a 'modes' attribute to the dependencies
in manifest.xml. For now, it allows to set dependencies that are
specific to either 'test' or 'doc' with e.g.

  <depend name='flexmock' modes='test' />

The value in the 'modes' attribute is a comma-separated list of
modes (as said, either 'test', 'doc' or both). Dependencies that
do not have the 'modes' attribute set are used in all modes.