Elasticsearch 5: Collapse tests to one class
This commit removes duplicate test code from the elasticsearch5 and elasticsearch5-rest test classes.