Implementation for provided and optional

* Introduces a `provided` configuration.
* Introduces an `optional` attribute.
* Handles configurations for publishing to Ivy and Maven repos.
* Added unit/integration tests.

This should probably become a "regular" Gradle plugin. At the moment there's no direct dependency on another Nebula plugin.
Changed the code to reuse some of your logic from the publishing plugin to avoid this exception to be thrown:

> Cannot configure the 'publishing' extension after it has been accessed.

Validated by applying the plugin in the Nebula project, declaring a `provided` and `optional` dependency and running `build`.