Add beforeSend and dataType option to prefetch

Takes care of #226.