Cleanup tests - using assert method instead of assert keyword
Remove `omit_term_freq_and_positions` for new indices

`omit_term_freq_and_positions` was deprecated in `0.20` and
is not documented anymore. We should reject indices that are
created with this option in the future.

Closes #4722
Add SecurityManger / policy when running tests.

This commit adds a security manager to the test JVMs
that prevents mainly writing files outside of the JVMs
current test directory.