leaseset: add missing bound checks
leaseset: add missing bound checks

This builds on ChadF's issue and patch (https://github.com/PurpleI2P/i2pd/issues/1772)
and fixes other potential bound check issues.

PurpleI2P/i2pd,PurpleI2P/i2pd,PurpleI2P/i2pd,PurpleI2P/i2pd