I have a pair of Channellocks that have a pipe wrench style jaw for dealing with those. Otherwise, it's the same as dealing with a stuck bolt, penetrating oils and perhaps heat. You want to be very carefull with heat, especially if you're going to reuse the master cylinder. There is a very good chance that the nuts are actually seized to the line itself, rather than in the master cylinder. I see this very often.
Honest opinion time, with as bad as the nuts are, you would be best at least replacing them, and possibly the line as well. Line and fittings are cheap, no need to fight something that will most likely need to be replaced anyway.