The mid-infrared instrument for the James Webb space telescope, II: design and build