Thousands lined the streets of Tehran as Iran held state funerals for military commanders and nuclear scientists killed during the conflict with Israel.