Allow clear package lock when 1st install fails

I upgraded a system this morning. An issue during the 1st package reinstall caused the package lock to be set, but no packages installed. The Backup/Restore GUI page did not show the section for resetting the package lock, because it only displays that if there is at least 1 package installed - catch-22.
This fixes that odd condition.
Display only needed Reinstall and Clear Package Lock buttons

Make the code a bit smarter, so the user only sees whichever of the reinstall and clear package lock buttons that are actually relevant.
Merge pull request #365 from phil-davis/master

Allow clear package lock when 1st install fails