Ultra-high energy density relativistic plasmas and x-ray generation by ultrafast laser irradiation of nanowire arrays