Hide sharing sections in files app when sharing API is disabled

Backport of 1de5ae8845393be599e543efde45d22db989658a from master