At least 19 people were killed in an Islamist militant attack on a village in northeast Nigeria in the early hours of Sunday, a survivor of the attack said.