[ENGINE] Remove engine related command classes

Todaqy we pass structs to the engine to call optimize / refresh and flush.
This commit cleans up this logic to reduce complexity in the engine.

Conflicts:
	src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java
	src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java
	src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java
	src/test/java/org/elasticsearch/index/engine/internal/InternalEngineTests.java
[SCRIPT] ScriptService can deadlock entire nodes if script index is recovering

we currently have operationThreaded set to false when indexing a script. This setting
means that if we are executing the operation locally that we don't spawn a new thread for
it althought incoming thread in this case is the network thread. Now sicne we are indexing here
the engine is currently recovering which sometimes locks the engine for finalization blocks on
a network call waiting for the recovery target to come back the internal lock in engine will never be
released since we are waiting with our network thread for it to be released.