Plans to allow more secrecy in magistrates courts dropped after backlash condemning the idea as ‘justice in the dark’