Scientists use the molecular makeup of million-dollar masterpieces and family snapshots to conserve and authenticate them