Transport for London is set to take over rail services in the capital from four private sector franchise operators under a plan agreed with government ministers.