A young man of ethnic Caucasus origin has been shot dead in Moscow an hour before he was supposed to be tried in court for a racially motivated attack.