Implements a -log(likelihood) calculation from a dataset (assumed to be binned) and a PDF.
The NLL is calculated as
\[ \sum_\mathrm{data} -\log( \mathrm{pdf}(x_\mathrm{data})) \]
In extended mode, a \( N_\mathrm{expect} - N_\mathrm{observed}*log(N_\mathrm{expect}) \) term is added.