Hong Kong's China-backed government has apologised over the handling of politically charged legislation that sparked massive street protests over the past week.