Attempt to refactor two "duplicate" functions.

Attempt to extract a generic function `prelude-get-positions-of-line-or-region` from `prelude-duplicate-current-line-or-region` and `prelude-duplicate-and-comment-current-line-or-region`
Merge pull request #499 from bixuanzju/patch-1

Attempt to refactor two "duplicate" functions.
don't enable coffee-cos mode if buffer filename is nil
Merge pull request #501 from wishbear/master

don't enable coffee-cos mode if buffer filename is nil
Merge remote-tracking branch 'upstream/master'
merge from origin/master