Bipolar disorder and the risk of developing dementia