Exchange energy density of inhomogeneous electron gas near a metal surface