Gruntfile: Fix #13949 by separating docs into separate task & refactoring
Merge pull request #14394 from twbs/gruntfile-bower

Fix `grunt dist` under Bower by separating docs into separate task