As his new play opens at the Royal Court, playwright Thomas Eccleshare muses on what it means to be a writer and whether that has changed recently