Fix handling of unescaped sequences in index patterns, closes #1570

The function for turning index patterns into loosely matched wild carded patterns would break if there were multiple unescaped sequences, eg ` [logstash-]YYYY[.w]WW` was ending up as `logstash-*.w`, when it should be `logstash-*.w*`. The pull fixes this behavior and adds some tests.