London nailbomber invented delusions, court told