Boko Haram kill 40, torch 300 homes in Nigeria