How Hamas built a force for the 7 October attack