A nine-story building under construction in a city north of the Philippine capital of Manila has collapsed, trapping dozens of workers.