Huntington Ingalls Industries, America’s largest shipbuilder, is enjoying sudden success in hiring new shipbuilders and retaining skilled ones—with positive consequences for the US Navy.