James Boswell, Charlotte Brontë, Charles Darwin, Florence Nightingale, Marcel Proust, and Andy Warhol - what do they all have in common? They were all hypochondriacs. Brian Dillon examines the relationship between creativity, illness and the imagination