(PUP-2395) Refactor puppetmaster-postinst sed calls
This commit brings over a change from the debian puppet packaging to
move all of the sed calls in to one sed invocation and to use a tempfile
instead of operating directly on the live apache vhost file.