An analysis of the Keen model for credit expansion, asset price bubbles and financial fragility