The head of the National Security Bureau, Jacek Siewiera, has submitted his resignation to President Andrzej Duda.