Extended likelihood approach to multiple testing with directional error control under a hidden Markov random field model