A gunman in Jacksonville, Florida killed three black people before taking his own life in a murder spree police say was racially motivated.