Hamlin holds off Elliott, takes first NASCAR win in Vegas