Expand profiles before [un]merging them, re #1421

This mainly addresses the fact that the following two commands generate
different output:
  $ lein pom
  $ lein with-profile default pom
I believe the problem also affects uberjar, since both tasks unmerge
:default prior to doing their thing.

Version 2.3.4 generates the same output for the above two commands,
because it doesn't expand profiles in the with-profile task, as master
does. So this change attempts to only deal with fully-expanded profiles
when [un]merging them.
Merge remote-tracking branch 'jcrossley3/expand-profiles'

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.