Forty-five people were killed by suspected Boko Haram gunmen pretending to be preachers in a village near the group's spiritual home in northeast Nigeria, two residents said on Thursday.