config: Refactor the check for the lid special-case out

This also fixes the case where current_is_for_laptop_lid wasn't properly
set in the default case.
config: Fix the memory and other management for MetaMonitorConfig

The code in MetaMonitorConfig was really complex and was trying to do
way too much, using multiple different variables to determine where
things were stored, and trying to do fancy tricks to transfer
ownership.

Add a refcounting system to help simplify this, and clean up the logic.
Simply along the way, this fixes multiple bugs in the monitor config
logic, most notably bug #734889, which was my original goal to fix.