#946 Added IPv6 support for API server

IPv6 addresses are specified as suggested in http://tools.ietf.org/html/rfc5952

using square brackets, e.g. [2001:db8:85a3:8d3:1319:8a2e:370:7348]:1337