Fix multitype index mapping restoration

Tested againts the latest version of ES 1.4.1.
Without this fix, the url that is defined in the
callback does not iterate properly through all the
types because of a race condition.

Also the Put Mapping API expects a dictionary like
{"properties": { "field1": ..., "field2": ...}}
The previous formatting used 'key' to prefix the dict
making all subsequent calls to ES return a 400.

Moreover, the URL used is incorrect, according to ES
docs it needs to be {index}/_mapping/{type} and not
{index}/{type}/_mapping