Reverts previous changes in to_vizjson_v2 to support Layers API controller. They are no longer needed as we use to_poro now.
CDB-2891 removes invalid argument
CDB-2891 check layer creation permissions
CDB-2891 Only check table permissions for data layers.
CDB-2891 Sanity check to modify options only if they are present