A suicide bomber has detonated an explosive vest among guests at a wedding ceremony in northwest Pakistan, killing at least seven people and wounding 25 others.