The man shot dead by police following a stabbing attack in south London was a convicted terrorist who had recently been released from prison.