[MRG]: improve logcosh function + tests

This PR inclides the additions and edits from #2248 that were independent from the `fast_dot`. Besides STY/DOC/COSMITS the `_logcosh` function's memory footprint was improved via chunking and and tests got fixed.

cc @agramfort @ogrisel