Party leaders faced questions from a live studio audience in a special BBC debate ahead of the Scottish Parliament election.