Vacuum energy in (2+1)-dimensional quantum field theory on curved spaces