Taylor Swift's stalker has been sentenced to six months in jail on charges of attempted burglary after he broke in to her New York apartment last year.