enhance upload selector

- Change the icon on the button to a file when attachments are enabled
- Display the list of allowed extensions in the upload selector
- FIX : regexps for validating uploads weren't escaping the dots

Only images:
![topics_-_zogstrip_s_discourse 2](https://f.cloud.github.com/assets/362783/898090/1f936af0-fb03-11e2-9f96-30500d5f64ea.png)

Attachments enabled:
![topics_-_zogstrip_s_discourse](https://f.cloud.github.com/assets/362783/898091/1f974a44-fb03-11e2-9b6e-15f198f3d516.png)