Compilable backport of ForgeMultipart branch from Mr_TJP

includes 054bfaf74a023218ac988413a944369ca5565a80 ,
b131f403e66940a2b41568f75056c14fd242ceb6 ,
84c224d2caa3c8c39d5f33ad9cd589cd9e9a64f6 ,
8d35fc128c0f4cfb40a63fb41c55177fd6ab2911 , and
419d14e73514045ed28fcbf542cbc6550771a597