Add moving installed.txt into TMP in bootstrap

Because of installed.txt is moved to TMP, for existing installation, the
installed.txt will be moved from CONFOG to TMP by bootstrap.
Also moved installed.txt checking into bootstrap, and defined a constant
for install status to save a few file checking.