Don't enable relay master if no slaves are present
Fix memory corruption when reloading static leases
Fix another memory corruption
Merge remote-tracking branch 'upstream/master'