Refactored AckedClusterStateUpdateTask & co. to remove code repetitions in subclasses

Made AckedClusterStateUpdateTask an abstract class instead of an interface, which contains the common methods.
Also introduced the AckedRequest interface to mark both AcknowledgedRequest & ClusterStateUpdateRequest so that the different ways of updating the cluster state (with or without a MetaData*Service) can share the same code.
Removed ClusterStateUpdateListener as we can just use its base class ActionListener instead.

Closes #6559
Fixed NPE in recovery api by serializing the recovery type in StartRecoveryRequest.

Closes #6190
[TEST] Verify that all pending tasks are rely executed on *all* nodes.
[TEST] Move the waiting for pending tasks to helper methods and let the percolator and update mapping test use these helper methods.
Fix optional default script loading
Groovy is optional as a dependency in the classpath, make sure we properly detect when its not at the right time to disable it
closes #6582