Bug 1077859: Make ENCODING_FAILED safe to use in static initializers, r=mmc

--HG--
extra : rebase_source : 78e1410ab6c94bd6b20a78208a2421db338aed94
Bug 1077887: Work around old GCC "enum class" bug, r=mmc

--HG--
extra : rebase_source : ce707672dfc0587760c09701fd6adbe26c874916
Bug 1077926: Make test certificate generation faster by reusing key, r=keeler

--HG--
extra : rebase_source : 360fe925397688c1d0a2386c4974def6b571f0d4