Hong Kong’s top judge has defended the city’s legal system after intensifying criticism over the treatment of democracy activist and newspaper founder Jimmy Lai.