Merge  #1628 and build again

Rebase wip/no-blankies to current branch
Something like:

```
/**
 * Refactors an `.sbt` file so that the new settings are used instead of any existing settings.
 * @param lines  The lines of an sbt file as a List[String] where each string is one line
 * @param commands A List of settings (space separate) that should be inserted into the current file.
 *                                  If the settings replaces a value, it will replace the orginal line in the .sbt file.
 * @return a list of new lines which represent the contents of the refactored .sbt file.
 */
```

As a potential.   By writing the docs, this will highlight where our APIs in sbt are a bit 'odd'.    For example, I think I may go clean up this interface at some point to just take in:
  `(SbtConfigFile, Seq[SessionSetting]) => SbtConfigFile`

Or some other set of types which have more meanings than `List[String]` and `List[List[String]]`.

For now, this API is fine, but I'd like to clean up (either yourself or my team) before we get into sbt master.

cc @eed3si9n