[GEO] Fix for NPE enclosed in SearchParseException for a "geo_shape" filter or query

This fix adds better error handling for parsing multipoint, linestring, and polygon GeoJSONs.  Current logic throws a NPE when parsing a multipoint, linestring, or polygon that does not comply with the GeoJSON specification. That is, if a user provides a single coordinate instead of an array of coordinates, or array of linestrings, the ShapeParser throws a NPE wrapped in a SearchParseException instead of a more useful error message.

Closes #8432
Core: don't forcefully release IndexWriter lock on engine start

It's dangerous to release this lock because it means another ES
somehow still has an IndexWriter open on the directory, which can
lead to corruption.

Instead, we don't release the lock, and the user will see an exception
on init.

This was already fixed on master with #8588; I'm backporting to 1.x
here.

Closes #8892
Mappings: Fix Get field mapping api with pretty flag

Closes #6552
[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