Hamlin holds off Keselowski to score emotional win for JGR