refactored python wrappers for top and hier block

I was only going to add ```msg_connect(endpoint1, endpoint2)``` where ```endpoint1 = (block, port)```, but ended up refactoring the whole thing. In summary:

- extends ```msg_connect()``` to accept the same tuple args as implemented for ```connect()``` (see above)
- removes a lot of code duplication
- fixes indent errors and updates old-school Python syntax

I was wondering why we even bother renaming functions like connect to primitive_connect in swig. Can't those be accessed through the ```_impl``` (before ```_tb, _hb```) attribute with their original name? ```__getattr__()``` won't be invoked for those, anyway.