Three people were killed as protesters opposing a court-ordered survey of a Mughal-era mosque clashed with security personnel