Refactor muldf3 and mulsf3.

Patch from: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3886