Take measures to make signature computation stable w.r.t. metadata
dicts. Together with a matching commit in FFC this fixes some jit cache misses.
Apply str() to values in canonicalize_metadata to make python 3 happy when sorting dicts.
Bugfix in canonicalize_metadata.