A powerful cyclone has ripped through the South Pacific island nation of Samoa, flattening homes, uprooting trees and flooding streets.