FTX has filed for bankruptcy in the US, seeking court protection as it looks for a way to return money to users.