A Loss Function Approach to Model Specification Testing and Its Relative Efficiency