The government should set time limits for public inquiries and "not let them go on for years and years", Harriet Harman has said.