1. I've never heard or discovered a way to give buildings inventorys, sorry but i cant help you here.
2. A good range for a melee attack for a tower? A melee attack is a melee attack, its always close range. Open up the object editor and go to any unit that uses a melee attack (blademaster, footman, grunt, etc). And look at the range of his melee attack, then just copy and paste that field's value to your tower.