Utility: added String::{begins,ends}With().

Also with allocation-free const char[] overload.
PluginManager: avoid needless string copying in plugin registration.

Already done for some time in AbstractPlugin constructor itself, but I
forgot to fix also all these macros and internal functions.
PluginManager: assert instead of failing not-so-gracefully.

In some cases the forgivable behavior caused crash later.
PluginManager: allow plugin to access its associated manager.

The plugin might want to dynamically load and use plugins instead of
making them a hard dependency (e.g. "meta" image import plugin, which
delegates the actual import to another plugin based on detected file
type).

Currently to have access to plugin manager they would need to be always
instantiated through it. This is inconvenient for testing, so
there is a special constructor which takes instance of specific plugin
manager as a parameter.

The manager pointer is exposed only through protected function as
there is no reason for it to be used from outside.