Using non-mapped fields in prefix queries shouldn't cause NullPointerException

Fixes #2408
lucene 4: Exposed Lucene's codec api

This feature adds the option to configure a `PostingsFormat` and assign it to a field in the mapping. This feature is very expert and in almost all cases Elasticsearch's defaults will suite your needs.

## Configuring a postingsformat per field

There're several default postings formats configured by default which can be used in your mapping:
a* `direct` - A codec that wraps the default postings format during write time, but loads the terms and postinglists into memory directly in memory during read time as raw arrays. This postings format is exceptional memory intensive, but can give a substantial increase in search performance.
* `memory` - A codec that loads and stores terms and postinglists in memory using a FST. Acts like a cached postingslist.
* `bloom_default` - Maintains a bloom filter for the indexed terms, which is stored to disk and builds on top of the `default` postings format. This postings format is useful for low document frequency terms and offers a fail fast for seeks to terms that don't exist.
* `bloom_pulsing` - Similar to the `bloom_default` postings format, but builds on top of the `pulsing` postings format.
* `default` - The default postings format. The default if none is specified.

On all fields it possible to configure a `postings_format` attribute. Example mapping:
```
{
  "person" : {
     "properties" : {
         "second_person_id" : {"type" : "string", "postings_format" : "pulsing"}
     }
  }
}
```

## Configuring a custom postingsformat
It is possible the instantiate custom postingsformats. This can be specified via the index settings.
```
{
   "codec" : {
      "postings_format" : {
         "my_format" : {
            "type" : "pulsing40"
            "freq_cut_off" : "5"
         }
      }
   }
}
```
In the above example the `freq_cut_off` is set the 5 (defaults to 1). This tells the pulsing postings format to inline the postinglist of terms with a document frequency lower or equal to 5 in the term dictionary.

Closes #2411
Added licence header.
changed test method names.
Renamed pulsing40 and Lucene40 postings format providers to pulsing and default respectively for more consistent naming in settings.
Removed old file.
uid to use bloom filter posting by default
keep the uidField around so we don't have to look it up
Add JavaDocs for Codecs, PostingsFormat and related services/modules
Add a toString() method to MultiSearchResponse
Add constructor IndexRequest(String index, String type) and fix javadoc
allow to associate a payload with bulk requests
first phase at optimizing merging large mappings
bulk them the same level ones when traversing and introduce them
second phase at optimizing merging/parsing large new mappings
apply the new mappings only after the parsing/merging of a full doc/mapping is done
Add per-field Similarity support
Setting logger levels using cluster update settings does not work
fixes #2428
only log that we delete unused shard if it exists
conservative timeouts on internal recovery actions
safe guards against cases where intenral recovery actions take too long (possibly due to a bug)
Added control over Query used by MatchQuery with there are zero terms after analysis
Match query should fail when trying to provide several fields in its simplified form
fixes #2432