Improve detection of index existence

Allow aliases (like _all) to be used only when reading data.

fix #205
fix #233

(cherry picked from commit 7527c4ae1c26b75c1e2e0a1eea39cbf8b3e57aec)
Allow index wild cards

improve index validation
relates #233

(cherry picked from commit 04f3c998a94880bdad59731d9b3100eab187265c)