The Thai government has threatened to impose a curfew in Bangkok following three days of fighting that has killed at least 24 people.