Detection and Estimation in Gaussian Random Fields: Minimax Theory and Efficient Algorithms