Issues 974 and 1003

This pull request is for the "hello rest" and "hello secure rest" samples plugins, and the required modifications in elasticsearch to support them.

It adds the ability to replace/add to elasticsearch REST API with a custom rest handler (issue 974) and to add "reverse proxies" (filters) on top of REST APIs to perform basic security checks (issue 1003).