Use precomputed static strings for chr

Summary: We already have these to support $str[$idx]. Might as
well use them for chr($chr) too.

Reviewed By: @swtaarrs

Differential Revision: D1595026
Allow shutdown function registration during shutdown

Summary: Closes #2981

Reviewed By: @ptarjan

Differential Revision: D1561536