[tor-commits] [tor/master] Unify functions for reading/writing PEM keys, to avoid duplication.