Requirement in order to discuss derivative and terminology for $x\in E\cap E'$. There are some people defined the hypothesis of discussing derivative of a function $f:E\rightarrow\mathbb{R}$ at $c$ to be that $c$ must in $E$ and be a limit(cluster) point of $E$, namely $c\in E\cap E'$, rather than simply put $E$ is an open interval containing $c$. I think there should be some terminology just describe this kind of the point. (e.g. $c$ is a XX point of $E$.) I have several analysis books, but didn't find one.
Another question, due to the difference of the definition of the derivative in terms of difference requirement on $c$. There are really some different description of the consequent theorems may occur. For example, if one takes the definition that $c\in E\cap E'$ in order to discuss the derivative of a function, than $f:[0,1]\rightarrow\mathbb{R}$ defined by $f(x)=x$ is differentiable at $1$, but if adopting the definition just like in the introductory calculus book(open interval containing $c$), then he should have slightly change the definition, or give another new definition(e.g. defining a one-sided derivative) in order to make the function be differentiable at $1$. And also, if one adapts the former, a common theorem in calculus that "if $f$ is differentiable at $c$ and $f$ has a relative extremum at $c$, then $f'(c)=0$" should be rewrite, since $f:[0,1]\rightarrow\mathbb{R}$ defined by $f(x)=x$ suits the antecedent, but $f'(1)\neq 0$. I haven't learned PDE or functional analysis or other advanced courses yet, so I don't have the whole picture and view to figure out which is better.
 A: Here's a general approach which I think might prove helpful.
First, we define what we mean by a limit:
Let $(M,d)$ and $(N,\rho)$ be metric spaces.  Let $A \subseteq M$, let $f: A \to N$, let $a \in M$ be an accumulation point of $A$, and let $b \in N$.  If given any $\epsilon \in \mathbf R^+$ there exists some $\delta \in \mathbf R^+$ such that for all $x \in A$ we have the following:$$0 \lt d(x,a) \lt \delta \Rightarrow \rho(f(x),b) \lt \epsilon$$then we say that the limit of $f(x)$ as $x$ approaches $a$ is equal to $b$, and we write $$\lim_{x \to a}f(x)=b$$
Note that when $M=\mathbf R$ (using the usual Euclidean metric), this definition naturally handles limits at the endpoints of $A$.  We can force consideration of one-sided limits by restricting the domain appropriately and using the subspace metric, so no additional definitions should be needed for those cases.
Next, we define what it means for a function to be continuous:
Let $(M,d)$ and $(N,\rho)$ be metric spaces.  Let $A \subseteq M$, let $f: A \to N$, and let $a \in A$.  We say that $f$ is continuous at $a$ if either of the following holds:$$1)\; a\, \text{is not an accumulation point of} \,A$$ $$\text{or}\; 2)\; \lim_{x \to a}f(x)=f(a)$$
Note that the first option ($a$ is not an accumulation point of $A$) gives us continuity for "free" at isolated points of the domain.  It can be shown that this definition of continuity is equivalent to characterizations involving sequences, pre-images of open sets, and pre-images of closed sets.
Finally, we can define differentiability:
Let $\mathbf K$ be either $\mathbf R$ or $\mathbf C$.  Let $X \subseteq \mathbf K$ and let $a \in X$ be an accumulation point of $X$.  Let $E$ be a normed vector space over $\mathbf K$.  A function $f: X \to E$ is called differentiable at $a$ if the limit$$\lim_{x \to a}\frac{f(x)-f(a)}{x-a}$$exists in $E$.
Again, when $\mathbf K = \mathbf R$, we can handle one-sided derivatives by restricting the domain appropriately and using the subspace metric.
So, to answer the first part of your question: yes, we need to have a point be an accumulation point (i.e., a cluster point or a limit point) before we can talk about differentiability there.
As for the second part of your question, you're referring to this theorem attributed to Fermat, but you missed a critical part of hypothesis:
Suppose that $X \subseteq \mathbf R$ and $f: X \to \mathbf R$ has a local extremum at $a \in \text{int}(X)$.  If $f$ is differentiable at $a$, then $f'(a)=0$.
To answer the second part of your question: the fact that $a$ is an interior point of $X$ is a critical part of the hypothesis.  The theorem simply doesn't hold without it.  So your example, which has $X = [0,1]$ and $a=1$, a boundary point, doesn't contradict the theorem.
I hope this helps.
