The jail death of a Scots sex attacker who went "shopping" for a victim late at night is to be probed by a Sheriff.