lxd/api/internal: Rework internalShutdown to return valid response as LXD is shutdown
lxd/api/internal: Rework internalShutdown to return valid response as LXD is shutdown

 - Switches to using d.shutdownDoneCh and response.ManualResponse.
 - This allows us to send a response to the requestor and flush it just before we allow the LXD daemon process to exit.

Signed-off-by: Thomas Parrott <6b778ce645fb0e3dde76d79eccad490955b1ae74@canonical.com>

stgraber/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,hallyn/lxd,stgraber/lxd,hallyn/lxd,hallyn/lxd,lxc/lxd,stgraber/lxd,lxc/lxd,lxc/lxd,lxc/lxd,stgraber/lxd,hallyn/lxd,stgraber/lxd,hallyn/lxd,lxc/lxd,hallyn/lxd,lxc/lxd