Optimally displaced threshold detection for discriminating coherent states