The structure of branch points in minimal surfaces and in pseudoholomorphic curves