Pricing and Portfolio Optimization Analysis in Defaultable Regime-Switching Markets