Fix createNewConnection method

Observe, that `connection` is created other way round drag from input connector to output connector in `master` version: https://dl.dropboxusercontent.com/u/16408368/WebUI_FlowChart/index.html

(note that in the dropbox version, you need to drag from connector to right and then left to connect connectors from input to output; in the most recent version, this dragging is fixed by 69af4a0d5eb19e20b6293752baae425a7602cd17)

This PR changes these things:
- Fix creating connections when drag goes from other way round (from input connector to output connector), so it doesn't matter if you drag from output connector to input connector or input connector to output connector.
- Disallow connecting 2 output connectors or 2 input connectors
- Disallow connecting a node with itself

Let me know if any questions.