During a voyage, the master of a vessel is a general agent for each of the owners of the cargo, and has authority to do whatever they might do for the preservation of their respective interests, but he can not sell or hypothecate the cargo, except in the cases mentioned in this chapter.