On the internal structure of starless cores. II. A molecular survey of L1498 and L1517B