Join lines with a single space

Removing trailing whitespace from the current line and leading whitespace from the line below when joining and put the cursor to the left of the added space to make adding things like a `,` easy.

Continuation of #3739 

Fixes #3439