Add analyze API

I've redone https://github.com/ramv/node-elastical/pull/7
starting from current head version since this pull seems to have failed.