vectorize calculate.sample/ratio.pvalue()

- improve perfomance of calculate.sample/ratio.pvalue() by
  vectorizing calls to pnorm() and distr::p()
- fix the typo in calculate.sample.pvalue() that only lratio[1] was actually
  tested for NA
updated documentation