(maint) Fix json diff check and Helper Fix

Prior to this commit, the function munge_resource_for_comparison did not
properly convert the edges data into a set for comparison. It also add
redundant code within install_postgresql for pe hosts. This commit
fixes that check within the function and also simplifies the code within
install_postgresql.