Hankel edge ideals of trees and (semi-)Hamiltonian graphs