At least 12 people - mostly police - have been killed in a blast in the Swat Valley.