Here's how you can use a margin loan to borrow from your investment portfolio as an alternative to a HELOC or other credit.