Housing is at the heart of one midlands town’s fight against extremism. Martin Hilditch finds out why