Updated migrations for running from an effective 1.2 instance (WFP one was slightly updated).
Fixed the failing case of migrations with an empty layers table.
Added the host in psycopg2 connection string as without it causes an error in installation procedure, even if default should be localhost.
Merge branch 'master' of https://github.com/GeoNode/geonode