Graph.add_edge_list(): improve handling of hashed=True for arbitrary types

2 jobs for master in 666 minutes and 7 seconds
Status Name Job ID Coverage
  Test
passed job_clang_amd64 #4806
amd64

11:06:07

passed job_gcc_amd64 #4805
amd64

04:50:43