improve unittest and some fixes

modified:   heat/engine/resources/neutron/network_gateway.py
- add _show_resource() to use port_id in the template.
- add cast for segmenatation_id

modified:   heat/tests/test_neutron_network_gateway.py
- improve unittest for network_gateway_connection
- adopt flake8