significant terms: add scriptable significance heuristic

This commit adds scripting capability to significant_terms.
Custom heuristics can be implemented with a script that provides
parameters subset_freq, superset_freq,subset_size, superset_size.

Script heuristic and results have to be serialized. When deserializing the ScriptService is not available and the new score cannot be computed immediately after reading the result.
Therefore, instead of re-computing the score the score is serialized with each bucket. 
For the reduce phase the script is initialized before buckets are reduced (https://github.com/brwe/elasticsearch/compare/elasticsearch:master...brwe:significant-terms-scripting?expand=1#diff-ba5a615f489137f2b16d37bc54dd3f8dR174) which seems a little clumsy to me. Happy for any suggestion.
Just tried running this example and I'm getting NumberFormatExceptions for the above example and wide range of similar expressions. e.g.


    org.elasticsearch.script.groovy.GroovyScriptExecutionException: NumberFormatException[null]
			at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
			at org.elasticsearch.search.aggregations.bucket.significant.heuristics.ScriptHeuristic.getScore(ScriptHeuristic.java:118)


I've noticed however that adding a fraction part to expressions works e.g. if I rewrite the above as

                             "script": "_subset_freq/(_superset_freq - _subset_freq + 1.0)"

(note the ".0" addition) it works so it looks like an issue relating to use of integers vs doubles?