Bug 1042319 - [Gallery] Update gallery edit UI r=djf

Thanks for jsperf comparison, I agree it's better to use JSON stringify for edit flow use case.