The LOFAR pilot surveys for pulsars and fast radio transients