Two powerful storms that struck Spain and Portugal in quick succession over the past three days have killed at least eight people and caused widespread flooding and damage.