Superconductivity, structure and resistivity in HgBa2Ca2Cu3O8+δ