ASACORE-812: Fix writing PID file when switching user.

Typically, a Linux daemon must write its PID to the pidfile under
/var/run/ prior to switching to an unpriviledged user.  The code prior
to this change would try and fail to create the pidfile because it
switched to an unpriviledged user first, then tried creating the
pidfile.  This change swaps those operations.

Change-Id: I047cad37b6f8d7f2de7305aa100be06314e95d8f
Signed-off-by: Steve Kinneberg <stevek@qce.qualcomm.com>
Merge "ASACORE-812: Fix writing PID file when switching user."