Risk maximum distance

Addresses https://bugs.launchpad.net/openquake/+bug/1095582