On generalized Friedrichs and Krein-von Neumann extensions and canonical systems