Download csv measurements template.

- Don't show csv tab when user not permitted to edit or when no devices are present.
- Fix template creation (property might have 0 devices which causes exception)