Use sql alchemy to fetch a scalar for the max tunnel id

Bug 1174998

Change-Id: I77203c81c2c910a1a601416efc4567f1320a2eef
Merge "Use sql alchemy to fetch a scalar for the max tunnel id"