Hundreds of Palestinians have attended the funeral for a man who was shot dead by Israeli forces near the occupied West Bank city of al-Khalil.