Thousands of photographs from a collection belonging to playwright George Bernard Shaw are to be made available to the public online, the National Trust has said.