Jens Spahn, a member of Germany's Bundestag, has resigned his post amid uproar over his use of a surrogate to have a baby.