Swift and NuSTAR observations of GW170817: Detection of a blue kilonova