Gustav Freytag, Nationalversammlung 1848