Fix the address handling for editing existing address #952

This patch makes sure that the address parameter passed to the template is an
active record.
It also handles the case where country and subdivision are not present in the
address and prevent blowup due to same.
Tests for the above.