Don't write default profile during shutdown

* Add Profile::IsLoginProfile()
* Skip updating preferences in the methods that are
  called during shutdown.

I kept the behavior during the active session to be safe.

BUG=302578
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/25351006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227147 0039d316-1c4b-4281-b951-d872f2087c98
Mac: Do not ask to handle power events in processes with no PowerManager.

Otherwise Chrome causes a 30-second delay trying to put a Mac to sleep.

Only the main browser process, and nacl processes, create a
PowerMonitorDeviceSource. However, renderers and other processes still
call the static function PowerMonitorDeviceSource::AllocateSystemIOPorts.
This results in the process asking to receive power change
notifications, but not hooking up a function to acknowledge them. This
results in 30-second timeouts while trying to sleep a Mac.

This change removes plugin, renderer, utility and worker processes from
the list of process types that register to receive power change events
from OS X.

BUG=132336
TEST=Put a Mac to sleep with Chrome running. After waking, run `pmset -g
log` from Terminal. There should be no new entries for Chrome under
applicationresponse.timedout [10.6] or on a `Timedout` line [10.8]

Review URL: https://codereview.chromium.org/25954005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227148 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 227148