Jailed Venezuelan opposition leader Leopoldo Lopez must go on trial on charges related to mass anti-government protests, a judge rules.