Former Australia PM 'undermined' responsible government with secret ministries - solicitor general