GistScore: Learning Better Representations for In-Context Example Selection with Gist Bottlenecks