Linear series on semistable curves