Pipelined Byzantine Fault Tolerance and Applications