[views] csvexport accept an empty rset (closes #4236928)
When you tried to apply the 'csvexport' view on an empty rset, the view
couldn't be selected and you got a HTTP 500 error.
Also add two new test cases.
sql('DROP FUNCTION IF EXISTS _fsopen(bytea)')sql('DROP FUNCTION IF EXISTS fspath(bigint, text, text)')