Append .min to js/css files if minified

- generate_files() was checking the wrong parameter to determine whether
to append .min to the file name, the $type parameter can likely be
removed
- JS files would only work with JS minification if they were added with
.min as part of the original file name
- CSS minification was broken by the generate_files() fix, so adjusted
the behavior to match JS minification
add parameter to bypass output of global.js

When adding scripts to a page it may be desirable to bypass output of
global.js (e.g. if a script is output before jQuery is loaded).
user settings: allow changing role when creating user (#792)
Merge remote-tracking branch 'upstream/develop' into develop